package VWorldGameStudio.touzi;

import java.io.Serializable;
import java.util.Random;

import static FCRendering.FCRMaster.fcv;
import static FCRendering.FCRMaster.player1;

public class BoBuShaTanProject extends FCTouZiProject{
    //收益是280分之1，最大收益是1800G
    public BoBuShaTanProject() {
        projectCHName = "沙滩投资";
        projectEnName = "boBuShaTan";
        minTouziMoney = 1000;
        ad = "旅游是永不过时的消费项目!";
    }

    public BoBuShaTanProject(FCTouZiProject tmp){
        super(tmp);
    }

    public int getHuiBaoMoney() {
        int willGetMoney = touZiMoney/280;
        if(willGetMoney > 0){
            willGetMoney = Math.min(1800, willGetMoney);
            Random random = new Random();
            if(random.nextFloat() > 0.25){
                fcv.getMessage().add("从波布沙滩旅游投资获得收益 +"+willGetMoney+"G");
                fcv.showMessage();
                allGetShouYiMoney += willGetMoney;
                player1.setMoney(player1.getMoney()+willGetMoney);
            }else {
                fcv.getMessage().add("波布沙滩周围出现了鲨鱼，收入减增");
                fcv.showMessage();
            }
        }
        return 0;
    }
}
